﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GpsTagger.Logic
{
    class MapPoint
    {
        protected string name;
        protected int latDeg, latMin, latSec;
        protected int lonDeg, lonMin, lonSec;

        public MapPoint()
        {
            latDeg = latMin = latSec = lonDeg = lonMin = lonSec = 0;
            name = "noname";
        }
        public MapPoint(string givenName, int latitudeDeg, int latitudeMin, int latitudeSec, int longitudeDeg, int longitudeMin, int longitudeSeconds)
        {
            name = givenName;
            latDeg = latitudeDeg;
            latMin = latitudeMin;
            latSec = latitudeSec;
            lonDeg = longitudeDeg;
            lonMin = longitudeMin;
            lonSec = longitudeSeconds;
        }

        #region GETTERS_AND_SETTERS
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        public int LatitudeSeconds
        {
            get { return latSec; }
            set { latSec = value; }
        }

        public int LatitudeMinutes
        {
            get { return latMin; }
            set { latMin = value; }
        }

        public int LatitudeDegrees
        {
            get { return latDeg; }
            set { latDeg = value; }
        }

        public int LongitudeSeconds
        {
            get { return lonSec; }
            set { lonSec = value; }
        }

        public int LongitudeMinutes
        {
            get { return lonMin; }
            set { lonMin = value; }
        }

        public int LongitudeDegrees
        {
            get { return lonDeg; }
            set { lonDeg = value; }
        }
        #endregion

        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("["); sb.Append(name); sb.Append("] ");
            sb.Append("[Lat ");
            sb.Append(latDeg); sb.Append(",");
            sb.Append(latMin); sb.Append(",");
            sb.Append(latSec); sb.Append("] ");
            sb.Append("[Lon ");
            sb.Append(lonDeg); sb.Append(",");
            sb.Append(lonMin); sb.Append(",");
            sb.Append(lonSec); sb.Append("]");
            return sb.ToString();
        }
    }
}
